
// 不需要导入 Vue 来创建路由，因为 Vue 3 创建路由的方式不同
import { createRouter, createWebHistory } from 'vue-router';

import Home from '../views/Home.vue';
import About from '../views/About.vue';
import ArticleListPage from '../views/ArticleList.vue';

const router = createRouter({
  history: createWebHistory(), // 使用 history 模式
  routes: [
    {
      path: '/index',
      name: 'HomePage',
      component: Home
    },
    {
      path: '/about',
      name: 'AboutPage',
      component: About
    },
    {
      path: '/article_list',
      name: 'ArticleListPage',
      component: ArticleListPage
    }
  ]
});

export default router;

